import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:niu_app/views/homepage/edit_home_page.dart';


class Tap extends StatefulWidget {
  @override
  _TapState createState() => _TapState();
}

class _TapState extends State<Tap> {
  @override
  Widget build(BuildContext context) {
    return Stack(
      alignment: Alignment.topCenter,
      children: [
      Container(
      decoration: BoxDecoration(
        image: DecorationImage(
            fit: BoxFit.cover,
            image: NetworkImage("https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic.htwed.com%2F2017%2F10%2F10%2Fhrdvhqx7s62i5xyz8dlbu86ncju7em5l.jpg&refer=http%3A%2F%2Fpic.htwed.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1618803790&t=ab03a1d8d4d8355e094269223dcdf400")
        ),
      ),
    ),
        Positioned(
          bottom: 62.h,
          child: GestureDetector(
            onTap: ()=>Get.to(EditHomePage(),transition: Transition.cupertino,),
            child: Column(
              children: [
                Center(
                  child:ClipOval(
                      child: Image.asset('assets/boy1.png',height: 48.h,width: 48.w,)
                  ),
                ),
                Center(
                  child: Column(
                    children: [
                      Text("陈大牛",style: TextStyle(color: Colors.white,fontSize: 16.sp)),
                      Row(
                        mainAxisAlignment: MainAxisAlignment.center,
                        children: [
                          Text("男 / 广东珠海",style: TextStyle(color: Colors.white70,fontSize: 10.sp),),
                          SizedBox(width: 3,),
                          Image.asset('assets/niu.png',height: 16.h,width: 16.w,)
                        ],
                      ),
                    ],
                  ),
                ),
                Container(
                  constraints: BoxConstraints(
                    maxWidth: MediaQuery.of(context).size.width
                  ),
                    padding: EdgeInsets.symmetric(horizontal: 16.h),
                    margin: EdgeInsets.all(10),
                    child:Text("一句话的个人简介或签名，最多两行显示，超出以省略号表示。一句话的个人简介或签名，最多两行显示，超出以省略号表示。一句话的个人简介或签名....",style: TextStyle(color: Colors.white70,fontSize: 10.sp),maxLines: 2,overflow: TextOverflow.ellipsis,),
                ),
              ],
            ),
          ),
        )
      ],
    );
  }
}
